import fetch from "@/utils/fetch";

// 说明：添加零用量分析
// 接口：api/cb/flZeroDosage
// 请求类型：Post
export function addFlZeroDosage(obj) {
    return fetch({
        url: "api/cb/flZeroDosage",
        method: "post",
        data: obj,
    });
}

// 说明：删除零用量分析
// 接口：api/cb/flZeroDosage/ids
// 请求类型：Delete
export function deleteFlZeroDosage(idArr) {
    return fetch({
        url: "api/cb/flZeroDosage/del",
        method: "delete",
        data: idArr,
    });
}

// 说明：修改零用量分析
// 接口：api/cb/flZeroDosage/{id}
// 请求类型：Put
export function modifyFlZeroDosage(id, obj) {
    return fetch({
        url: "api/cb/flZeroDosage/" + id,
        method: "put",
        data: obj,
    });
}
// 说明：零用量历史分页查询(条件搜索)
// 接口：api/cb/flZeroDosage/search/{page}/{size}
// 请求类型：Post
export function searchFlZeroDosage(page, size, data) {
    return fetch({
        url: `api/cb/flZeroDosage/search/${page}/${size}`,
        method: "post",
        data,
    });
}

// 说明：零用量历史分页查询(条件搜索)
// 接口：api/cb/flZeroDosage/search/{page}/{size}
// 请求类型：Post
export function searchFlZeroDosageHistory(page, size, data) {
    return fetch({
        url: `api/cb/flZeroDosage/getNull/${page}/${size}`,
        method: "post",
        data,
    });
}

// 说明：获取单个零用量分析
// 接口：api/cb/flZeroDosage/{id}
// 请求类型：get
export function getFlZeroDosage(id) {
    return fetch({
        url: "api/cb/flZeroDosage/" + id,
        method: "get",
    });
}

// 说明：零用量分析导出Excel模板
// 接口：api/cb/flZeroDosage/exprotExcelModel
// 请求类型：get
export function downTem() {
    return fetch({
        url: "api/cb/flZeroDosage/exprotExcelModel",
        responseType: "blob",
        method: "get",
    });
}

// 说明：零用量分析导出Excel数据
// 接口：api/cb/flZeroDosage/exprotXls/{ids}
// 请求类型：post
export function exprotXls(ids, obj) {
    return fetch({
        url: "api/cb/flZeroDosage/exprotXls/" + ids,
        responseType: "blob",
        method: "post",
        data: obj,
    });
}

// 说明：零用量分析导入
// 接口：api/cb/flZeroDosage/importXls
// 请求类型：post
export function importXls() {
    return fetch({
        url: "api/cb/flZeroDosage/importXls",
        method: "post",
    });
}